package demo4;

interface A {
    void fun();
}
class B {
    public void fun1() {
        System.out.println("fun1()");
    }
}
public class Test {
    public static void main(String[] args) {
        B b = new B() {
            @Override
            public void fun1() {
                System.out.println("匿名内部类");
            }
        };
        b.fun1();
    }
}
